package com.xzjt.common.components;

import java.util.concurrent.TimeUnit;

/**
 * @author yuandong
 * @date 2021/9/13 9:43
 * 过期时间枚举类--redis使用
 */
public enum ExpireEnum {


    //未读消息的有效期为30天
    UNREAD_MSG(30L, TimeUnit.DAYS);

    //过期时间
    private Long time;

    //时间单位
    private TimeUnit timeUnit;


    ExpireEnum(Long time, TimeUnit timeUnit) {
        this.time = time;
        this.timeUnit = timeUnit;
    }



    public Long getTime() {
        return time;
    }

    public TimeUnit getTimeUnit() {
        return timeUnit;
    }
}
